<?php /* Smarty version 2.6.20, created on 2016-07-19 16:58:57
         compiled from ./supplieProducts/modify.php */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('block', 'supplieProducts', './supplieProducts/modify.php', 5, false),array('block', 'shops', './supplieProducts/modify.php', 9, false),array('modifier', 'default', './supplieProducts/modify.php', 23, false),)), $this); ?>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "admin/top.php", 'smarty_include_vars' => array('subject' => 'supplieProducts')));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "supplieProducts/top.php", 'smarty_include_vars' => array('subject' => 'supplieProducts')));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
<div id="content">
  <form method="post">
  <?php $this->_tag_stack[] = array('supplieProducts', array('limit' => 1,'id' => $this->_tpl_vars['segment']['id'])); $_block_repeat=true;smarty_block_supplieProducts($this->_tag_stack[count($this->_tag_stack)-1][1], null, $this, $_block_repeat);while ($_block_repeat) { ob_start(); ?>
  	<input name="productid" type="hidden" id="productid" value="<?php echo $this->_tpl_vars['products']['product_sku_id']; ?>
" size="30"/>
    <table width="100%" border="0" cellpadding="5" cellspacing="0" id="editor">
        <tr>
        <td class="title">产品供应商:<br/><br/><select name="shopid" onchange="$('[shopid]').hide();$('[shopid='+this.value+']').show();"><?php $this->_tag_stack[] = array('shops', array()); $_block_repeat=true;smarty_block_shops($this->_tag_stack[count($this->_tag_stack)-1][1], null, $this, $_block_repeat);while ($_block_repeat) { ob_start(); ?><option value="<?php echo $this->_tpl_vars['shops']['id']; ?>
" <?php if ($this->_tpl_vars['shops']['id'] == $this->_tpl_vars['products']['shopid']): ?>selected<?php endif; ?> <?php if (1 == $this->_tpl_vars['shops']['disabled']): ?>disabled<?php endif; ?>><?php echo $this->_tpl_vars['shops']['title']; ?>
</option><?php $_block_content = ob_get_contents(); ob_end_clean(); $_block_repeat=false;echo smarty_block_shops($this->_tag_stack[count($this->_tag_stack)-1][1], $_block_content, $this, $_block_repeat); }  array_pop($this->_tag_stack); ?></select></td>
        <td class="content">
        	<select name="supplier" multiple="multiple" size="10" style="height: auto;">
        		<?php $_from = $this->_tpl_vars['suppliers']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['item']):
?>
        			<option value="<?php echo $this->_tpl_vars['item']['id']; ?>
" <?php if ($this->_tpl_vars['item']['id'] == $this->_tpl_vars['products']['supplieid']): ?>selected<?php endif; ?> shopid="<?php echo $this->_tpl_vars['item']['shopid']; ?>
" style="<?php if ($this->_tpl_vars['products']['shopid'] != $this->_tpl_vars['item']['shopid']): ?>display:none;<?php else: ?><?php endif; ?>"><?php echo $this->_tpl_vars['item']['title']; ?>
</option>
        		<?php endforeach; endif; unset($_from); ?>
        	</select>按住ctrl多选
        </td>
        <td class="content"> <?php if ($this->_tpl_vars['errors']['empty_supplier']): ?><span class="warning">请指定供应商</span>
        <?php else: ?>指定供应商
        <?php endif; ?></td>
      </tr>
      <tr>
        <td width="100" class="title">产品名称:</td>
        <td width="240" class="content"><input name="product" type="text" id="product" value="<?php echo ((is_array($_tmp=@$_POST['product'])) ? $this->_run_mod_handler('default', true, $_tmp, @$this->_tpl_vars['products']['pname'], 1) : smarty_modifier_default($_tmp, @$this->_tpl_vars['products']['pname'], 1)); ?>
" size="30" readonly="true"/> *</td>
        <td width="821" class="content">填写产品的名称</td>
      </tr>
      <tr style="display:none;">
        <td class="title">产品ID:</td>
        <td class="content"><input name="productid" type="text" id="productid" value="<?php echo $this->_tpl_vars['products']['product_sku_id']; ?>
" size="30"/></td>
        <td class="content">&nbsp;</td>
      </tr>
      <tr>
        <td class="title">产品规格:</td>
        <td class="content"><input name="spec" type="text" id="spec" value="<?php echo ((is_array($_tmp=@$_POST['spec'])) ? $this->_run_mod_handler('default', true, $_tmp, @$this->_tpl_vars['products']['spec'], 1) : smarty_modifier_default($_tmp, @$this->_tpl_vars['products']['spec'], 1)); ?>
" size="30"  disabled="true"/></td>
        <td class="content">填写产品规格, 如 50g，200ml等</td>
      </tr>
      <tr>
        <td class="title">采购单价:</td>
        <td class="content">
        	<input name="pricebuy" type="text" id="pricebuy" value="<?php echo ((is_array($_tmp=@$_POST['pricebuy'])) ? $this->_run_mod_handler('default', true, $_tmp, @$this->_tpl_vars['products']['pricebuy']) : smarty_modifier_default($_tmp, @$this->_tpl_vars['products']['pricebuy'])); ?>
" size="30" update_price=1/>
        	<select name="currency_unit">
        		<option value="">---请选择---</option>
        		<?php $_from = $this->_tpl_vars['currency_unit_arr']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['culist']):
?>
        		<option value="<?php echo $this->_tpl_vars['culist']['unit_en']; ?>
" <?php if ($this->_tpl_vars['products']['currency_unit'] == $this->_tpl_vars['culist']['unit_en']): ?>selected<?php endif; ?>><?php echo $this->_tpl_vars['culist']['unit_name']; ?>
</option>
        		<?php endforeach; endif; unset($_from); ?>
        	</select>
        	 *
        </td>
        <td class="content"><?php if ($this->_tpl_vars['errors']['empty_pricebuy']): ?><span class="warning">采购单价不能为空</span>
        <?php else: ?>填写采购单价<span class="warning">(请选择正确的货币单位)</span>
        <?php endif; ?> </td>
      </tr>
      <tr>
        <td class="title">供应商库存:</td>
        <td class="content"><input name="stock" type="text" id="stock" value="<?php echo ((is_array($_tmp=@$_POST['stock'])) ? $this->_run_mod_handler('default', true, $_tmp, @$this->_tpl_vars['products']['stock']) : smarty_modifier_default($_tmp, @$this->_tpl_vars['products']['stock'])); ?>
" size="30" /> </td>
        <td class="content">允许销售的库存数</td>
      </tr>
      <tr>
        <td class="title">供应商最大库存:</td>
        <td class="content"><input name="stock_base" type="text" id="stock_base" value="<?php echo ((is_array($_tmp=@$_POST['stock_base'])) ? $this->_run_mod_handler('default', true, $_tmp, @$this->_tpl_vars['products']['stock_base_num']) : smarty_modifier_default($_tmp, @$this->_tpl_vars['products']['stock_base_num'])); ?>
" size="30" /> </td>
        <td class="content">允许销售的最大库存数</td>
      </tr>
      <tr class="noline">
      	<td class="title">供应商产品编号:</td>
      	<td class="content"><input name="sbarcode" type="text" id="sbarcode" value="<?php echo ((is_array($_tmp=@$_POST['sbarcode'])) ? $this->_run_mod_handler('default', true, $_tmp, @$this->_tpl_vars['products']['sbarcode']) : smarty_modifier_default($_tmp, @$this->_tpl_vars['products']['sbarcode'])); ?>
" size="30"/></td>
        <td class="content">填写产品条码数字, 如 4711161741799等</td>
      </tr>
      <tr>
      	<td class="title">状态:</td>
        <td class="content">
        	<input name="status" type="radio" id="status" value="-3" <?php if ($this->_tpl_vars['products']['status'] == -3): ?>checked<?php endif; ?>/>下架
        	<input name="status" type="radio" id="status" value="1" <?php if ($this->_tpl_vars['products']['status'] == 1): ?>checked<?php endif; ?>/>上架
    	</td>
        <td class="content">&nbsp;</td>
      </tr>
      <tr>
      	<td class="title">是否默认:</td>
        <td class="content">
        	<input name="is_default" type="radio" id="is_default" value="0" <?php if ($this->_tpl_vars['products']['is_default'] == 0): ?>checked<?php endif; ?>/>否
        	<input name="is_default" type="radio" id="is_default" value="1" <?php if ($this->_tpl_vars['products']['is_default'] == 1): ?>checked<?php endif; ?>/>是
    	</td>
        <td class="content">&nbsp;</td>
      </tr>
    </table>
    
    <div class="fr mt10">
    <input type="submit" value="确定" class="btn" />
    <a href="javascript:window.history.go(-1);" class="btn">取消</a> 
    <input name="id" type="hidden" id="id" value="<?php echo $this->_tpl_vars['products']['id']; ?>
" />
    <input name="referer" type="hidden" id="referer" value="<?php echo ((is_array($_tmp=@$_POST['referer'])) ? $this->_run_mod_handler('default', true, $_tmp, @$_SERVER['HTTP_REFERER'], 1) : smarty_modifier_default($_tmp, @$_SERVER['HTTP_REFERER'], 1)); ?>
" />
    <input name="action" type="hidden" id="action" value="modify" />
    </div>
	<?php $_block_content = ob_get_contents(); ob_end_clean(); $_block_repeat=false;echo smarty_block_supplieProducts($this->_tag_stack[count($this->_tag_stack)-1][1], $_block_content, $this, $_block_repeat); }  array_pop($this->_tag_stack); ?>
	
  </form>
</div>
<script type="text/javascript">
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "admin/bottom.php", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
</body>
</html>